class DlgAlert extends Dlg
public var button;

var body;
var label;
var doBack;
function DlgAlert(text,doBack){
	this.doBack=doBack;
	this.addChild([
		[{dim:"body",pos:[0,0,510,250],bg:["#fff","#888",6],mask:true},
			[new Label(text),{dim:"label",pos:[40,75,430],multi:true,align:"c"}],
			[new Button(["知道了","#0b0"]),{dim:"button",pos:[0,"b","f",85],bg:["#fff",["#eee"]]}],
		]
	]);
	var h=this.label.getClientH();
	if(h>40) this.label.setAlign("left");
	h+=220;
	if(h>G.h*0.9){
		h=G.h*0.9;
		this.label.set({enabled:true,mask:true,scroll:true,h:h-190})
	}
	this.body.setPos("c","c",this.body.w,h);
	this.button.setPos(0,"b");
	this.base.transit({alpha:[0,0.4],time:200});
}
function onClose(){
	this.remove();
	call(this.doBack);
}
function onButtonClick(){
	this.close();
}